//package com.muxue.module.ai.config;
//
//
//import org.jasypt.encryption.pbe.StandardPBEStringEncryptor;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//// 加密存储API密钥（使用Jasypt）
//@Configuration
//public class SecurityConfig {
//
//    @Bean
//    public String apiKey(
//            @Value("${jasypt.encryptor.password}") String jasyptKey,
//            @Value("${ENCRYPTED_API_KEY}") String encryptedKey
//    ) {
//        StandardPBEStringEncryptor encryptor = new StandardPBEStringEncryptor();
//        encryptor.setPassword(jasyptKey);
//        return encryptor.decrypt(encryptedKey);
//    }
//}